<template>
  <div class="home-banner">
    <XtxCarousel :swipers='list' :duration="2" :autoplay="true" />
  </div>
</template>
<script>
import { findBanner } from '@/api/home'
import { ref } from 'vue-demi'
export default {
  name: 'HomeBanner',
  setup () {
    const list = ref([])
    findBanner().then(ret => {
      list.value = ret.result
    })
    return {
      list
    }
  }
}
</script>
<style scoped lang="less">
.home-banner {
  width: 1240px;
  height: 500px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 98;
  // vue3深度选择器
  .xtx-carousel {
    :deep(.carousel-btn.prev) {
      left: 270px;
    }
    :deep(.carousel-indicator) {
      padding-left: 250px;
    }
  }
}
</style>
